package com.jzl.swing.service.impl;

import java.util.List;

import com.jzl.swing.dao.SupplierDao;
import com.jzl.swing.dao.impl.SupplierDaoImpl;
import com.jzl.swing.entity.Supplier;
import com.jzl.swing.service.SupplierService;

public class SupplierServiceImpl implements SupplierService{

	private SupplierDao supplierDao = new SupplierDaoImpl();
	@Override
	public int addSupplier(Supplier supplier) throws Exception {
		return supplierDao.add(supplier);
	}

	@Override
	public int deleteSupplier(Supplier supplier) throws Exception {
		return supplierDao.delete(supplier);
	}

	@Override
	public int modifySupplier(Supplier supplier) throws Exception {
		return supplierDao.modify(supplier);
	}

	@Override
	public List<Supplier> queryAll() throws Exception {
		return supplierDao.queryAll();
	}

	@Override
	public Supplier queryById(String supplier_id) throws Exception {
		return supplierDao.queryById(supplier_id);
		
	}

	@Override
	public List<Supplier> queryByName(String supplier_name) throws Exception {
		return supplierDao.queryByName(supplier_name);
	}
	
}
